<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddFieldAdminIdToCompanyUnitsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('company_units', function (Blueprint $table) {
            $table->unsignedBigInteger('admin_id',false)->default(0)->comment('管理员id')->after('description');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('company_units', function (Blueprint $table) {
            $table->dropColumn('admin_id');
        });
    }
}
